package com.whfc.emp.manager;


import com.whfc.common.exception.BizException;
import com.whfc.emp.entity.AppFaceGateConfig;
import com.whfc.emp.param.*;

/**
 * @Description 闸机服务
 * @Author hw
 * @Date 2021/1/4 10:52
 * @Version 1.0
 */
public interface FaceGateManager {

    /**
     * 初始化闸机配置
     *
     * @param appFaceGateConfig
     */
    void info(AppFaceGateConfig appFaceGateConfig);

    /**
     * 添加闸机
     *
     * @param request
     */
    void add(AppFaceGateAddParam request);

    /**
     * 删除闸机
     */
    void del(Integer faceGateId);

    /**
     * 闸机人员注册
     *
     * @param request
     */
    String faceGateGrantEmdAdd(FaceGateGrantEmdAddParam request);

    /**
     * 闸机人员照片注册
     *
     * @param request
     */
    String faceGateGrantEmdImgAdd(FaceGateGrantEmdImgAddParam request);

    /**
     * 闸机人员授权
     *
     * @param request
     */
    String faceGateGrantEmdAuth(FaceGateGrantEmdAuthParam request);

    /**
     * 闸机人员批量授权
     *
     * @param request
     */
    void faceGateBatchGrantEmpAuth(AppFaceGateGrantEmpParam request);

    /**
     * 闸机-取消人员授权
     */
    void faceGateRevokeEmp(AppFaceGateGrantEmpParam request);

    /**
     * 闸机人员授权
     *
     * @param deviceKey
     * @param name
     * @param imgUrl
     * @return
     */
    String deviceAuthorizationPerson(String deviceKey, String name, String imgUrl);

    /**
     * 闸机取消人员授权
     *
     * @param deviceKey
     * @param personGuid
     */
    String deviceAuthorizationCancel(String deviceKey, String personGuid);

    /**
     * 闸机开门
     *
     * @param deviceKey
     */
    void openDoor(String deviceKey) throws BizException;

    /**
     * 同步闸机授权人员
     *
     * @param faceGateId
     */
    void sync(Integer faceGateId);

    /**
     * 获取token
     *
     * @return
     */
    String getToken();
}
